function regClick(){
	$("#container ul li a").each(function(index,obj){
		if(index==0){
			$(this).click(function(){
				var userId=$("#myId").val();
				document.location = "http://www.yoasking.com/user/"+userId;
			});
		}else if(index==1){
			$(this).click(function(){
				var userId=$("#myId").val();
				document.location = "http://www.yoasking.com/follows/"+userId;
			});
		}else if(index==2){
			$(this).click(function(){
				var userId=$("#myId").val();
				document.location = "http://www.yoasking.com/fans/"+userId;
			});
		}
	});
}
function registNoLoginClick(){
	$("#container ul li a").each(function(index,obj){
		if(index==0){
			$(this).click(function(){
				var userId=$("#myId").val();
				document.location = "http://www.yoasking.com/user/"+userId;
			});
		}else if(index==1){
			$(this).click(function(){
				var userId=$("#myId").val();
				document.location = "http://www.yoasking.com/follows/"+userId;
			});
		}else if(index==2){
			$(this).click(function(){
				var userId=$("#myId").val();
				document.location = "http://www.yoasking.com/fans/"+userId;
			});
		}
	});
}
function unLoginFollowList(){
	$(".friList").html("");
	findNoLoginFollowList(function(response){
		if(!isUndefined(response)){
			$(".friList").html(response);
			regFollows();
		}
	});
}
function unLoginFansList(){
	$(".friList").html("");
	findNoLoginFansList(function(response){
		if(!isUndefined(response)){
			$(".friList").html(response);
			regFollows();
		}
	});
}
function followList(){
	$(".friList").html("");
	findFollowList(function(response){
		if(!isUndefined(response)){
			$(".friList").html(response);
			regFollows();
		}
	});
}
function fansList(){
	$(".friList").html("");
	findFansList(function(response){
		if(!isUndefined(response)){
			$(".friList").html(response);
			regFollows();
		}
	});
}
function formPost(url, paraJson) {
	$("body").append("<form id='__f' target='_self'></form>");
	$('#__f').attr('action', url);
	$('#__f').attr('method', 'post');
	$.each(paraJson, function(k, v) {
				$('#__f').append("<input type='hidden' name='" + k
						+ "' value='" + v + "' />");
			});
	// alert($('#__f').attr('action'));
	window.setTimeout((function() {
				$('#__f').submit();
			}), 0)
}
//点击头像个人主页
function skipYourHome(userId) {
	var url = "../user/toUserAsk.action";
	var param = {
		"userId" : userId
	};
	formPost(url, param);
}


